package com.liukai.todo_android.entity.vo;

import java.util.HashMap;
import java.util.Map;

public class ItemQueryCondition {

    private Long userId;

    private Long itemTypeId;

    private Byte timingType;

    private Integer finished;

    /**
     * 搜索关键字
     */
    private String searchKey;

    public Long getUserId() {
        return userId;
    }

    public ItemQueryCondition setUserId(Long userId) {
        this.userId = userId;
        return this;
    }

    public Long getItemTypeId() {
        return itemTypeId;
    }

    public ItemQueryCondition setItemTypeId(Long itemTypeId) {
        this.itemTypeId = itemTypeId;
        return this;
    }

    public Byte getTimingType() {
        return timingType;
    }

    public ItemQueryCondition setTimingType(Byte timingType) {
        this.timingType = timingType;
        return this;
    }

    public Integer getFinished() {
        return finished;
    }

    public ItemQueryCondition setFinished(Integer finished) {
        this.finished = finished;
        return this;
    }

    public String getSearchKey() {
        return searchKey;
    }

    public ItemQueryCondition setSearchKey(String searchKey) {
        this.searchKey = searchKey;
        return this;
    }

    @Override
    public String toString() {
        return "ItemQueryCondition{" +
                "userId=" + userId +
                ", itemTypeId=" + itemTypeId +
                ", timingType=" + timingType +
                ", finished=" + finished +
                ", searchKey='" + searchKey + '\'' +
                '}';
    }

    public Map<String, Object> buildMap() {

        Map<String, Object> map = new HashMap<>(5);
        if (this.getUserId() != null) {
            map.put("userId", this.getUserId());
        }
        if (this.getFinished() != null) {
            map.put("finished", this.getFinished());
        }
        if (this.getItemTypeId() != null) {
            map.put("itemTypeId", this.getItemTypeId());
        }
        if (this.getSearchKey() != null) {
            map.put("searchKey", this.getSearchKey());
        }
        if (this.getTimingType() != null) {
            map.put("timingType", this.getTimingType());
        }
        return map;
    }


}